import express from "express";
import adminController from "../controller/admin.controller.js";
import tokenHandler from "../middleware/token.middleware.js";
import adminHandler from "../middleware/admin.middleware.js";
const router = express.Router();
router.use(tokenHandler);
router.use(adminHandler);

//新建文件夹
router.get("/tenUsers", adminController.getTenUsers);
router.get("/users", adminController.getUsers);
router.get("/overview", adminController.getOverview);
router.get("/recent", adminController.getRecentDays);
router.get("/property", adminController.getFileProperty);
router.get("/logs", adminController.getLogs);
router.patch("/space", adminController.updateSpace);
router.patch("/status", adminController.updateUserStatus);
router.patch("/role", adminController.updateUserRole);
router.get("/config", adminController.getConfig);
router.patch("/config", adminController.updateConfig);

export default router;
